package com.missfresh.cooperation2meituan.service;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.missfresh.cooperation2meituan.dao.OrderDao;
import com.missfresh.cooperation2meituan.util.CommonUtil;

@Service
public class CacheService {
	
	@Resource
	private OrderDao orderDao;

	public static final  Map<String,Object> cache=new  HashMap<String,Object>();
	
	public void cacheData(){
		System.out.println("初始化方法");
		cache.put("orders", orderDao.queryMeituanOrders(CommonUtil.preparePage(null)));
		System.out.println("缓存数据"+cache.get("orders"));
	}
}
